#!/usr/bin/env python
# coding=utf-8
# __author__ = 'Yunchao Ling'

from pymongo import MongoClient
import pymongo

HOST = 'localhost'
PORT = 27017
DB_NAME = 'pubmed'
COLLECTION_NAME = 'metalist'

connection = MongoClient(HOST, PORT)
db = connection[DB_NAME]
collection = db[COLLECTION_NAME]

results=collection.find().sort("pmid",pymongo.ASCENDING)
for result in results:
    print result
    break

connection.close()